<script>
	export default {
		onLaunch() {
			const whiteList = ['/pages/login/login'];
			const currentRoute = getCurrentPages().pop()?.route;

			if (!uni.getStorageSync('token') && !whiteList.includes(currentRoute)) {
				uni.redirectTo({
					url: '/pages/login/login'
				});
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";
	@import "components/colorui/main.css";
	@import "components/colorui/icon.css";
</style>